#ifndef _PROCESS_TERMINATED_EVENT_H_
#define _PROCESS_TERMINATED_EVENT_H_

#include <Event.h>
#include <pthread.h>

class ProcessTerminationEvent: public Event
{
	public:
		void Trigger(int exit_status);
		int WaitForProcessTermination();
		void IncrementProcessCount();
		ProcessTerminationEvent(int proc_count);
		~ProcessTerminationEvent();
	private:
		int process_count;
		pthread_mutex_t mutex;
		pthread_cond_t condition;

		int acc_status;
};

#endif

